package com.chance.cc.crawler.development.command.trigger.domain.tianmao;

import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.development.command.trigger.CrawlerJobTriggerCommand;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;

/**
 * @author bx
 * @date 2020/12/7 0007 11:15
 */
public class TianmaoCommentScheduleTrigger {

    private static final String domainId = "tianmao";

    private static CrawlerJobTriggerCommand crawlerJobTriggerCommand =
            new CrawlerJobTriggerCommand("192.168.1.215",9599);

    public static void publishTMCommentScheduleTriggerInfo(String crawlerKey,String crawlerTriggerKey){
        HttpPage page = crawlerJobTriggerCommand.addOrUpdateScheduleCrawlerTrigger(
                crawlerKey,
                crawlerTriggerKey,
                domainId,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 10 1 * * ?",
                "天猫评论每天凌晨1：10点采集一次");
        System.out.println("添加采集调度： "+page.getRawText());
    }
}
